<template>
	<view class="content">
		<view class="login-logo">

		</view>
		<view class="paihang">
			<view class="box">
				<view v-for="(item,index) in xuanshouList" :key="index" class="shuxing">
					<text class="w260">{{item.name}}</text>
					<text>票数：{{item.piao}}</text>
				</view>
			</view>
		</view>

		<view class="btn-fanhui" @tap="fanhui">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				xuanshouList: []
			}
		},
		onShow() {
			this.getList()
		},
		methods: {
			//获取选手列表
			getList() {
				uni.showLoading({
					title: 'loading',
					mask: true
				})
				uniCloud.callFunction({
					name: 'get-paihangbang'
				}).then(res => {
					console.log(res.result.data)
					this.xuanshouList = res.result.data
					uni.hideLoading()
				})
			},
			fanhui() {
				uni.navigateTo({
					url: '../login/login'
				})
			},
			toupiaoguize() {

			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background: url('@/static/bg.jpg') no-repeat center top;
		background-size: 100% auto;
		height: 100%;
		overflow: hidden;
	}

	.login-logo {
		width: 750rpx;
		height: 520rpx;
		background: url('@/static/login-logo.png') no-repeat center center;
		background-size: 100% auto;
		// margin-top: 136rpx;
	}

	.paihang {
		width: 672rpx;
		height: 650rpx;
		background: url('@/static/paihang.png') no-repeat center center;
		background-size: 100% auto;
		// margin-top: -320rpx;
	}

	.shuxing {
		height: 94rpx;
		// margin-top: 30rpx;
		margin-bottom: 6rpx;
		// background: rgba(255, 255, 255, 0.6);
		display: flex;
		padding-left: 32rpx;
		flex-direction: row;
		align-items: center;
		color: #f9cc3d;
		font-weight: bold;
	}

	.w260 {
		width: 240rpx;
	}

	.box {
		margin-left: 252rpx;
		margin-top: 56rpx;
		display: flex;
		flex-direction: column;
	}

	.btn-fanhui {
		width: 222rpx;
		height: 70rpx;
		background: url('@/static/paihang-fanhui.png') no-repeat center center;
		background-size: 100% auto;
		margin-top: 276rpx;
	}
</style>
